home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
a_utils
/
perl
/
jinx.lha
/
curses.pl
next >
Wrap
Perl Script
|
1993-08-13
|
1KB
|
49 lines
#! /local/bin/perl
# curses.pl -- Copyright (c) 1990, Henk P. Penning.
# You may distribute under the terms of the GNU General Public License
# as specified in the README file that comes with the Jinx 2.1 kit.
sub addlog { &ctermlog($_[0]) if $logLevel >= 0 ; }
sub getchintR { return &ch2str(&getchR) ; }
sub initEdit
{ local($_) ;
&editreset ;
for ( @_ ) { &editq($_) ; }
}
sub initCurses
{ &initscr ;
&nonl ;
&cbreak ;
&noecho ;
&keypad(0,1) ;
&leaveok(0,0) ;
$flushOn = 1 ;
}
sub testCurses
{ local($_,@keys,@errors) ;
for ( ('keypad','beep','editl','editr') )
{ if ( ! defined($curfun{$_}) )
{ eval "sub $_ { ; }" ;
$curfun{$_} = 'EMPTY' ;
}
}
for ( @testCurses )
{ push(@errors,"jinx: required cterm function '$_' is absent")
if ! defined $curfun{$_} ;
}
return $#errors == -1, @errors ;
}
@testCurses = ('addstr','beep'
,'cbreak','clrreg','clrtoeol','ctermlog','edit'
,'editl','editq','editr','editreset','endwin'
,'getchR','initscr','keypad','leaveok','move'
,'mvaddstr','noecho','nonl','show') ;
1;